{% extends 'base.html' %}

{% load staticfiles %}
{% block main %}
    {% csrf_token %}
    <div class="Bott">
			<div class="wrapper clearfix" style="margin: 0 auto">
				<div class="zuo fl" style="margin-left: 100px">
					<h3>
						<a href="/"><img src="/static/images/tx.png"></a>
						<p class="clearfix"><span class="fl">[{{ user }}]</span><span class="fr logout">[退出登录]</span></p>
					</h3>
					<div>
						<ul>
							<li><a href="#">我的订单</a></li>
						</ul>
						<ul>
							<li><a href="/user/address/">地址管理</a></li>
						</ul>
                        <ul>
							<li><a href="/">回到首页</a></li>
						</ul>

					</div>
				</div>
				<div class="you fl">

    <div class="tx clearfix">
						<div class="fl clearfix">
							<a href="#" class="fl"><img src="/static/images/tx.png"></a>
							<p class="fl"><span>{{ user }}</span><a href="#">修改个人信息&gt;</a></p>
						</div>
						<div class="fr">绑定邮箱：{{ user }}</div>
					</div>
    <div class="bott">
						<div class="clearfix">
							<a href="#" class="fl"><img src="/static/images/gxin1.jpg"></a>
							<p class="fl"><span>待支付的订单：<strong>0</strong></span>
								<a href="#">查看待支付订单&gt;</a>
							</p>
						</div>
						<div class="clearfix">
							<a href="#" class="fl"><img src="/static/images/gxin2.jpg"></a>
							<p class="fl"><span>待收货的订单：<strong>0</strong></span>
								<a href="#">查看待收货订单&gt;</a>
							</p>
						</div>
					</div>

				</div>

            </div>
            </div>

{% endblock main %}
{%block footerjs %}
    <script>
    $('.logout').click(function () {

        $.ajax({
            type:'post',
            url:'/user/logout/',
            data:'csrfmiddlewaretoken='+$('input[name="csrfmiddlewaretoken"]').val(),
            success:function(result){
                //跳转到登录页面
                window.location.href='/user/login/'
            }
        })
    })
    </script>
{% endblock footerjs %}